<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>量子科技 - 门户登录</title>
    <style>
        :root {
            --primary-color: #00a8ff;
            --dark-bg: #0f1621;
            --card-bg: #1a2233;
            --text-light: #e0e6f0;
            --accent-color: #00f7ff;
        }

        body {
            background-color: var(--dark-bg);
            font-family: 'Segoe UI', Arial, sans-serif;
            color: var(--text-light);
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            background-image:
                radial-gradient(circle at 20% 30%, rgba(0, 168, 255, 0.15) 0%, transparent 20%),
                radial-gradient(circle at 80% 70%, rgba(0, 247, 255, 0.15) 0%, transparent 20%);
        }

        .login-container {
            background-color: var(--card-bg);
            border-radius: 12px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
            width: 380px;
            padding: 40px;
            position: relative;
            overflow: hidden;
        }

        .login-container::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 4px;
            background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
        }

        .logo {
            text-align: center;
            margin-bottom: 30px;
        }

        .logo h1 {
            font-size: 24px;
            font-weight: 600;
            margin-bottom: 5px;
            background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .logo p {
            font-size: 14px;
            opacity: 0.7;
            margin: 0;
        }

        .input-group {
            margin-bottom: 20px;
            position: relative;
        }

        .input-group label {
            display: block;
            margin-bottom: 8px;
            font-size: 14px;
            font-weight: 500;
        }

        .input-group input {
            width: 100%;
            padding: 12px 15px;
            background-color: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 6px;
            color: var(--text-light);
            font-size: 14px;
            transition: all 0.3s;
        }

        .input-group input:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 2px rgba(0, 168, 255, 0.2);
        }

        .remember-forgot {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 25px;
            font-size: 13px;
        }

        .remember-me {
            display: flex;
            align-items: center;
        }

        .remember-me input {
            margin-right: 8px;
        }

        .forgot-password a {
            color: var(--primary-color);
            text-decoration: none;
        }

        .login-btn {
            width: 100%;
            padding: 12px;
            background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
            border: none;
            border-radius: 6px;
            color: white;
            font-weight: 600;
            font-size: 15px;
            cursor: pointer;
            transition: all 0.3s;
        }

        .login-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(0, 168, 255, 0.4);
        }

        .signup-link {
            text-align: center;
            margin-top: 25px;
            font-size: 14px;
        }

        .signup-link a {
            color: var(--accent-color);
            text-decoration: none;
            font-weight: 500;
        }

        .particles {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
        }

        .particle {
            position: absolute;
            background-color: rgba(255, 255, 255, 0.5);
            border-radius: 50%;
        }
    </style>
</head>
<body>
    <div class="particles" id="particles"></div>

    <div class="login-container">
        <div class="logo">
            <h1>QUANTECH</h1>
            <p>量子科技 - 未来已来</p>
        </div>

        <form action="http://127.0.0.1:5000/api/login" method="post">
            <div class="input-group">
                <label for="userid">用户ID</label>
                <input type="text" id="userid" placeholder="输入您的用户名或邮箱">
            </div>

            <div class="input-group">
                <label for="password">密码</label>
                <input type="password" id="password" placeholder="输入您的密码">
            </div>

            <div class="remember-forgot">
                <div class="remember-me">
                    <input type="checkbox" id="remember">
                    <label for="remember">记住我</label>
                </div>
                <div class="forgot-password">
                    <a href="#">忘记密码?</a>
                </div>
            </div>

            <button type="submit" class="login-btn">登 录</button>
        </form>

        <div class="signup-link">
            还没有账户? <a href="http://127.0.0.1:5000/register">立即注册</a>
        </div>
    </div>

    <script>
        // 创建粒子背景效果
        const particlesContainer = document.getElementById('particles');
        const particleCount = 30;

        for (let i = 0; i < particleCount; i++) {
            const particle = document.createElement('div');
            particle.classList.add('particle');

            const size = Math.random() * 3 + 1;
            const posX = Math.random() * 100;
            const posY = Math.random() * 100;
            const delay = Math.random() * 5;
            const duration = Math.random() * 10 + 10;

            particle.style.width = `${size}px`;
            particle.style.height = `${size}px`;
            particle.style.left = `${posX}%`;
            particle.style.top = `${posY}%`;
            particle.style.opacity = Math.random() * 0.5 + 0.1;
            particle.style.animation = `float ${duration}s ease-in-out ${delay}s infinite`;

            particlesContainer.appendChild(particle);
        }

        // 添加CSS动画
        const style = document.createElement('style');
        style.textContent = `
            @keyframes float {
                0%, 100% {
                    transform: translate(0, 0);
                }
                25% {
                    transform: translate(5px, 5px);
                }
                50% {
                    transform: translate(-5px, 5px);
                }
                75% {
                    transform: translate(5px, -5px);
                }
            }
        `;
        document.head.appendChild(style);
    </script>
</body>
</html>